require(OpenMx)

stdErr <- function(x) {
	sqrt(var(x)/length(x))
}
set.seed(200); 
known = rnorm(1000,mean=0,sd=1)
known = as.data.frame(known); names(known)<-c("test")
stdErr(known$test) # 0.03145627

manifests <- names(known)
latents <- c()
factorModel <- mxModel("test SE", type="RAM",
      manifestVars = manifests,
      latentVars = latents,
      mxPath(from=manifests, arrows=2), # variance
      mxPath(from="one", to=manifests),
      mxData(known, type="raw")
)
summary(mxRun(factorModel))->test.summary
test.summary$parameters$Std.Error[1]
stdErr(known$test) - test.summary$parameters$Std.Error[1]

